import { Button, Drawer } from 'antd';
import React from 'react';
import { useDispatch, useSelector } from 'react-redux';
import {
  projectListAcitons,
  selectProjectModalOpen,
} from 'store/project-list.slice';
export const ProjectModal = () => {
  const dispatch = useDispatch();
  const projectModalOpen = useSelector(selectProjectModalOpen);
  return (
    <Drawer
      title="ProjectModal"
      onClose={() => dispatch(projectListAcitons.closeProjecModal())}
      visible={projectModalOpen}
      width={'100%'}
    >
      <Button onClick={() => dispatch(projectListAcitons.closeProjecModal())}>
        关闭
      </Button>
    </Drawer>
  );
};
